home *** CD-ROM | disk | FTP | other *** search
- Path: news.sprintlink.net!datalytics!news
- From: Rob Stewart <stew@datalytics.com>
- Newsgroups: comp.lang.c++
- Subject: Re: New C++ developers struggling with source configuration
- Date: 4 Jan 1996 21:17:45 GMT
- Organization: Datalytics, Inc
- Message-ID: <4chg5p$ldg@gold.datalytics.com>
- References: <4ccfkd$7f5@azizia.dtm-corp.com>
- NNTP-Posting-Host: pc071.datalytics.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- pierce@dtm-corp.com (Pierce Krouse) wrote:
- >We have a configuration problem brewing here where I work. We have a
- >SCCS-based source code control system which has worked well in
- >developing C applications for unix platforms. We have library and
- >application program source directories. We are starting to develop
- >C++ classes and applications. The big question is whether libraries
- >are the way to share classes between application programs, or if there
- >is a better way to let application programs get to class objects. We
- >would prefer to have the Makefile that builds a given application
- >retrieve an object file rather than the source file (even though it is
- >all controlled under source code control). The problem is
- >containment: several classes inherit or contain other classes, so we
- >cannot just give the application program a single object file -- or
- >can we?
- >
-
- If all you want is code reuse, a static library is your
- answer. If you want run-time sharing of the object code, you
- need to use your OS's shared library mechanism. For example,
- under MS Windows, you share object code via DLLs. UNIX System
- V uses shared libraries.
-
- Put the class headers in a common location, and put the
- corresponding libraries in another common location. Now, you
- maintain the libraries and headers under SCCS with dedicated
- makefiles. Each app, then, is dependent upon the libraries it
- uses. Only the object code for the app is dependent upon the
- class headers.
-
- Now, every team member can reuse the object code by linking
- with the appropriate library for the classes the app uses, and
- the class code is compiled only by the library makefiles.
-
- --
- Robert Stewart | My opinions are usually my own.
- Datalytics, Inc.
- (513)226-7700
- stew@datalytics.com
-
-
-